import axios from 'axios'

const request = axios.create({
  baseURL: 'http://192.168.1.11:3000/api/private/v1'
})

request.interceptors.request.use(config => {
  // console.log(config)
  // 为请求头对象，添加token验证的Authorization字段
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 在最后必须 return config
  console.log(config)
  return config
})

export default request
